﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Product.aspx.cs" Inherits="BackEnd.Product" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
	<title></title>
	<link href="~/Styles/Site.css" rel="stylesheet" type="text/css" />
</head>
<body>
	<form id="form1" runat="server">
	<div class="main">

		<div class="login">
			<h4>Product</h4>
			<asp:Label ID="lblName" runat="server" Text="Name" Width="70px" /> 
			<asp:TextBox ID="tbxName" runat="server" Width="300px"/>

			<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="tbxName" Display="Dynamic" >
				<img src="Images/errorInput.png" /> Not filled
			</asp:RequiredFieldValidator>

			<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="tbxName" Display="Dynamic"
				ValidationExpression="[А-Яа-я- \w]{2,255}" >
				<img src="Images/errorInput.png" /> Invalid value
			</asp:RegularExpressionValidator> 
		</div>

		<div class="login">
			<asp:Label ID="lblPrice" runat="server" Text="Price" Width="70px" /> 
			<asp:TextBox ID="tbxPrice" runat="server" Width="300px"/>

			<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="tbxName" Display="Dynamic" >
				<img src="Images/errorInput.png" /> Not filled
			</asp:RequiredFieldValidator>

			<asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="tbxName" Display="Dynamic"
				ValidationExpression="[\d]{2,16}" >
				<img src="Images/errorInput.png" /> Invalid value
			</asp:RegularExpressionValidator> 
		</div>

		<div class="login">
			<asp:Label ID="lblInfo" runat="server" Text="Info" Width="70px" /> 
			<asp:TextBox ID="tbxInfo" CssClass="txbInfo" runat="server" TextMode="MultiLine" MaxLength="2000"/>
		</div>

		<div id="divImage" class="image" runat="server" >
			<asp:Image ID="imgProduct" runat="server" />
		</div>

		<div class="login">
			<asp:Label ID="lblImage" runat="server" Text="Image" Width="70px" /> 
			<asp:FileUpload ID="fuploadImg" runat="server" />
			<asp:Button ID="btnLoad" runat="server" Text="Load" OnClick="btnLoad_Click" CausesValidation="false" />
		</div>

		<div class="login">
			<asp:Label ID="lblCategory" runat="server" Text="Category" Width="70px" />
			<asp:DropDownList ID="ddlCategory" runat="server" DataTextField="Name" DataValueField="CategoryId"/>
			
		</div>

		<div class="login">
			<asp:Button ID="btnSave" runat="server" Text="Save" OnClick="btnSave_Click" Width="100px" />&nbsp;&nbsp;
			<asp:Button ID="btnCancel" runat="server" Text="Cancel" OnClick="btnCancel_Click" CausesValidation="false" Width="100px" />
		</div>

		<div class="clear">
		</div>

	</div>
	</form>
</body>
</html>
